<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta name="language" content="en" />      

        <link rel="stylesheet" type="text/css"
              href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
        <link rel="stylesheet" type="text/css"
              href="<?php echo Yii::app()->request->baseUrl; ?>/css/bilyn.css" />
        <link rel="stylesheet" type="text/css"
              href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />
        <link rel="stylesheet" type="text/css"
              href="<?php echo Yii::app()->request->baseUrl; ?>/css/bootstrap/css/bootstrap-responsive.css" />

        <?php Yii::app()->clientScript->registerPackage('jquery') ?>

        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
    </head>
    <body>   
        <script type="text/javascript">
            /*<![CDATA[*/
            jQuery(function($) {
                var width = $(window).width();
                if(width < 950){
                    $('#page').css('width',width -2 +'px');                    
                }
                if(width < 767){
                    $('#page').css('margin-left','-20px');
                    $('#page').css('width',width -2 +'px');
                    /*  $('#footer ').css("text-align","left");*/
                    $("#div-main-logout").css('padding-left',width - 200 +'px');
                    $("#brand").hide();
                }              
            })   
            /*]]>*/
        </script>
        <div id="page" style="min-width: 380px">
            <div class="row-fluid hidden-phone">
                <div class="span3" style="min-width:235px;">
                    <h2 class="text-error" style="margin-left:20px"><?php echo CHtml::encode(Yii::app()->name); ?></h2>                    
                </div>
                <div class="span6" style="margin-top: 15px">
                    <h4>Connect to world as knock at next door</h4>
                </div>
            </div>            

            <?php if (!Yii::app()->user->isGuest): ?>
                <?php
                $mainMenu = Blyn::app()->getAppUI()->getMenu(BUIApp::MAINMENU);
                $items = $mainMenu['items'];
                ?>
                <!-- phone header -->
                <div class="hidden-desktop hidden-tablet">
                    <div style="min-width:800px;border-color: #000;background-color: #2d2d2d;opacity: 1;height: 35px;">
                        <div class="span1" style="margin-left:8px"><h4><a style="color:burlywood">bieleen.com</a></h4></div>
                        <div id="div-main-logout" class="span1" style="margin-top: 10px;color: blanchedalmond">
                            <a style="color:buttonshadow" href='<?php echo $items['logOut']['url']; ?>'><?php echo $items['logOut']['label']; ?></a></div>
                    </div>
                </div>
                <div class="navbar" style="padding-left:0px">     
                    <!-- header -->
                    <div class="navbar-inner" style="padding-left:2px">                       
                        <ul class="nav">      
                            <li class="active"><?php echo $items['mySpace']['ajaxUrl']; ?></li>
                            <li class=""><?php echo $items['myServices']['ajaxUrl']; ?></li>
                            <li class=""><?php echo $items['serviceStore']['ajaxUrl']; ?></li>    
                            <li class="hidden-phone"><a href='<?php echo $items['logOut']['url']; ?>'><?php echo $items['logOut']['label']; ?></a></li>
                        </ul>
                    </div>
                </div>

                <!-- mainmenu -->
            <?php endif ?>                    
            <?php echo $content; ?>            

            <!-- footer -->
            <div id="footer">
                Copyright &copy;
                <?php echo date('Y'); ?>
                by Bieleen.<br /> All Rights Reserved.<br />
            </div>    
        </div>
    </body>
</html>
